﻿<%@ Page Title="Observações" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Observacoes.aspx.cs" Inherits="Kakaroto.Pedidos.Observacoes" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <asp:FormView ID="ObservacaoProduto" runat="server" ItemType="Kakaroto.Models.Produto" SelectMethod="GetProduto" RenderOuterTable="false">
        <ItemTemplate>
            <div>
            </div>
            <div class="panel panel-primary">
                <div class="panel-heading">
                    Produto                   
                </div>

                <div class="panel-body">
                    <p><b><%#:Item.Nome %></b></p>
                    <p>Preço: <%#:String.Format("{0:c}", Item.Preco)%></p>
                </div>
            </div>
        </ItemTemplate>
    </asp:FormView>

    <asp:FormView runat="server"
            ItemType="Kakaroto.Models.ItemPedido" DefaultMode="Edit" DataKeyNames="Id, Id_Ped, Id_Prod"
            UpdateMethod="UpdateItem" SelectMethod="GetItem"
            OnItemCommand="ItemCommand" RenderOuterTable="false">
            <EmptyDataTemplate>
                <div class="alert alert-danger" role="alert">
                       Falha no carregamento de dados
                </div> 
            </EmptyDataTemplate>
            <EditItemTemplate>
                <fieldset class="form-horizontal">
                    
						    <asp:DynamicControl Mode="Edit" DataField="Qtdd" runat="server" />
                            <asp:DynamicControl Mode="Edit" DataField="Observacao" runat="server" />
						    
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
							<asp:Button runat="server" ID="UpdateButton" CommandName="Update" Text="Continuar" CssClass="btn btn-primary" />
							<asp:Button runat="server" ID="CancelButton" CommandName="Cancel" Text="Cancelar" CausesValidation="false" CssClass="btn btn-default" />
						</div>
					</div>
                </fieldset>
            </EditItemTemplate>
        </asp:FormView>

</asp:Content>
